package org.ne.springboot.anno;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import jakarta.validation.constraints.NotEmpty;
import org.ne.springboot.validation.StateValidation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;


/**
 * @author wey
 * @Date 2025/1/8 下午11:09 1月
 */

@Documented
@Constraint(
        validatedBy = {StateValidation.class}
)
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface State {

    String message() default "state 只能是 已发布 或 草稿";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};



}
